/* 
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

var xhr;
//alert("llegue al js materias");
function buscarDetalle(){
    
    if(window.ActiveXObject){        
        xhr = new ActiveXObject("Microsoft.XMLHttp");
    }
    else if(window.XMLHttpRequest || (typeof XMLHttpRequest)!= undefined){
        xhr = new XMLHttpRequest();
    }
    else{
        alert("su navegador no soporta AJAX");
        return;
    }

}

function cajasmaterialic(){
    buscarDetalle();
    var lic = document.getElementById("lic").checked;
//    alert("valoor del check"+sec);
    xhr.open("GET","../svlprofesoreslic?lic="+lic,true);
    xhr.onreadystatechange = imprimircajasmaterialic;
    xhr.send(null);
}
function imprimircajasmaterialic(){
    if(xhr.readyState == 4){
        document.getElementById("checklic").innerHTML=xhr.responseText;
    }
}



function checkprimerlicde(){
    buscarDetalle();
    xhr.open("GET","../primercuatrilicde",true);
    xhr.onreadystatechange = imprimecheksprimerlicde;
    xhr.send(null);
}
function imprimecheksprimerlicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("primerlicder").innerHTML=xhr.responseText;
            checksegundolicde();
        }
    }
}


function checksegundolicde(){
    buscarDetalle();
    xhr.open("GET","../segundocuatrilicde",true);
    xhr.onreadystatechange = imprimechekssegundolicde;
    xhr.send(null);
}
function imprimechekssegundolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("segundolicder").innerHTML=xhr.responseText;
            checktercerolicde();
        }
    }
}
function checktercerolicde(){
    buscarDetalle();
    xhr.open("GET","../tercerocuatrilicde",true);
    xhr.onreadystatechange = imprimechekstercerolicde;
    xhr.send(null);
}
function imprimechekstercerolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("tercerolicder").innerHTML=xhr.responseText;
            checkcuartolicde();
        }
    }
}


function checkcuartolicde(){
    buscarDetalle();
    xhr.open("GET","../cuartocuatrilicde",true);
    xhr.onreadystatechange = imprimechekscuartolicde;
    xhr.send(null);
}
function imprimechekscuartolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("cuartolicder").innerHTML=xhr.responseText;
            checkquintolicde();
        }
    }
}
function checkquintolicde(){
    buscarDetalle();
    xhr.open("GET","../quintocuatrilicde",true);
    xhr.onreadystatechange = imprimecheksquintolicde;
    xhr.send(null);
}
function imprimecheksquintolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("quintolicder").innerHTML=xhr.responseText;
            checksextolicde();
        }
    }
}


function checksextolicde(){
    buscarDetalle();
    xhr.open("GET","../sextocuatrilicde",true);
    xhr.onreadystatechange = imprimechekssextolicde;
    xhr.send(null);
}
function imprimechekssextolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("sextolicder").innerHTML=xhr.responseText;
            checkseptimolicde();
        }
    }
}


function checkseptimolicde(){
    buscarDetalle();
    xhr.open("GET","../septimocuatrilicde",true);
    xhr.onreadystatechange = imprimecheksseptimolicde;
    xhr.send(null);
}
function imprimecheksseptimolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("septimolicder").innerHTML=xhr.responseText;
            checkoctavolicde();
        }
    }
}


function checkoctavolicde(){
    buscarDetalle();
    xhr.open("GET","../octavocuatrilicde",true);
    xhr.onreadystatechange = imprimecheksoctavolicde;
    xhr.send(null);
}
function imprimecheksoctavolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("octavolicder").innerHTML=xhr.responseText;
            checknovenolicde();
        }
    }
}


function checknovenolicde(){
    buscarDetalle();
    xhr.open("GET","../novenocuatrilicde",true);
    xhr.onreadystatechange = imprimecheksnovenolicde;
    xhr.send(null);
}
function imprimecheksnovenolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("novenolicder").innerHTML=xhr.responseText;
            checkdecimolicde();
        }
    }
}

function checkdecimolicde(){
    buscarDetalle();
    xhr.open("GET","../decimocuatrilicde",true);
    xhr.onreadystatechange = imprimecheksdecimolicde;
    xhr.send(null);
}
function imprimecheksdecimolicde(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("decimolicder").innerHTML=xhr.responseText;
            
        }
    }
}












function checkprimerlicped(){
    buscarDetalle();
    xhr.open("GET","../primercuatrilicped",true);
    xhr.onreadystatechange = imprimecheksprimerlicped;
    xhr.send(null);
}
function imprimecheksprimerlicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("primerlicped").innerHTML=xhr.responseText;
            checksegundolicped();
        }
    }
}


function checksegundolicped(){
    buscarDetalle();
    xhr.open("GET","../segundocuatrilicped",true);
    xhr.onreadystatechange = imprimechekssegundolicped;
    xhr.send(null);
}
function imprimechekssegundolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("segundolicped").innerHTML=xhr.responseText;
            checktercerolicped();
        }
    }
}
function checktercerolicped(){
    buscarDetalle();
    xhr.open("GET","../tercerocuatrilicped",true);
    xhr.onreadystatechange = imprimechekstercerolicped;
    xhr.send(null);
}
function imprimechekstercerolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("tercerolicped").innerHTML=xhr.responseText;
            checkcuartolicped();
        }
    }
}


function checkcuartolicped(){
    buscarDetalle();
    xhr.open("GET","../cuartocuatrilicped",true);
    xhr.onreadystatechange = imprimechekscuartolicped;
    xhr.send(null);
}
function imprimechekscuartolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("cuartolicped").innerHTML=xhr.responseText;
            checkquintolicped();
        }
    }
}
function checkquintolicped(){
    buscarDetalle();
    xhr.open("GET","../quintocuatrilicped",true);
    xhr.onreadystatechange = imprimecheksquintolicped;
    xhr.send(null);
}
function imprimecheksquintolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("quintolicped").innerHTML=xhr.responseText;
            checksextolicped();
        }
    }
}


function checksextolicped(){
    buscarDetalle();
    xhr.open("GET","../sextocuatrilicped",true);
    xhr.onreadystatechange = imprimechekssextolicped;
    xhr.send(null);
}
function imprimechekssextolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("sextolicped").innerHTML=xhr.responseText;
            checkseptimolicped();
        }
    }
}


function checkseptimolicped(){
    buscarDetalle();
    xhr.open("GET","../septimocuatrilicped",true);
    xhr.onreadystatechange = imprimecheksseptimolicped;
    xhr.send(null);
}
function imprimecheksseptimolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("septimolicped").innerHTML=xhr.responseText;
            checkoctavolicped();
        }
    }
}


function checkoctavolicped(){
    buscarDetalle();
    xhr.open("GET","../octavocuatrilicped",true);
    xhr.onreadystatechange = imprimecheksoctavolicped;
    xhr.send(null);
}
function imprimecheksoctavolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("octavolicped").innerHTML=xhr.responseText;
            checknovenolicped();
        }
    }
}


function checknovenolicped(){
    buscarDetalle();
    xhr.open("GET","../novenocuatrilicped",true);
    xhr.onreadystatechange = imprimecheksnovenolicped;
    xhr.send(null);
}
function imprimecheksnovenolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("novenolicped").innerHTML=xhr.responseText;
            checkdecimolicped();
        }
    }
}

function checkdecimolicped(){
    buscarDetalle();
    xhr.open("GET","../decimocuatrilicped",true);
    xhr.onreadystatechange = imprimecheksdecimolicped;
    xhr.send(null);
}
function imprimecheksdecimolicped(){

    if(xhr.readyState == 4){
        if(xhr.status == 200)    {
            document.getElementById("decimolicped").innerHTML=xhr.responseText;
            
        }
    }
}